package com.hotel.app.controller;

import cn.hutool.core.convert.NumberWithFormat;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.hotel.app.service.UserWalletFeign;
import com.hotel.common.config.SystemConfig;
import com.hotel.common.param.PayAdd;
import com.hotel.common.util.JwtUtil;
import com.hotel.common.vo.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
 * @desc:
 * @author: ZHY
 * @date: 2024/6/17,18:37
 */
@RestController
@RequestMapping("/api/user/wallet")
public class UserWalletController {

    @Autowired
    private UserWalletFeign userWalletFeign;

    @PostMapping("/create")
    public R create(@RequestBody PayAdd payAdd) {

        return userWalletFeign.create(payAdd);
    }

    /**
     * 获取钱包余额
     */
    @RequestMapping("/my")
    public R ShowMyBalance() {

        return userWalletFeign.ShowMyBalance();
    }
    /**
     * 充值记录
     */
    @RequestMapping("/rechargeLogs")
    public R findRechargeLogs() {

        return userWalletFeign.findRechargeLogs();
    }
}
